<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="utf-8" http-equiv="content-type" content="text/html">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>我的</title>

<jsp:include page="../headres.jsp" flush="true" />

<link rel="stylesheet" type="text/css" href="css/myself.css">

<script>
$(document).bind('mobileinit',function(){
 $.mobile.changePage.defaults.changeHash = false;
 $.mobile.hashListeningEnabled = false;
 $.mobile.pushStateEnabled = false;
});
</script>

</head>
<body>
<input type="hidden" data-page="4" id="pageName"/>
<div data-role="page" id="user_page">
  <div data-role="content" class="content">
    <div class="user" align="center">
      <span class="u_name">${user.nickName }</span>
       <img class="photo" style = "border-radius: 50%;" src="${user.headimgurl }" />
       <p>
       <%--  <a href="#">
          <span class="jifen">累计积分</span>
          <span class="integral">${user.huoyueIntegral + user.jiaoyiIntegral }</span>
        </a>
        <span class="icon2">
          <img src="images/icon2.png" />
          <a href="javascript:void(0)" style="margin-top:-15px;">
            分享成果
          </a>
        </span>   --%> 
       </p>
    </div>
    <!-- <div class="evaluate">
      <div class="left">
        <div>
          <span>成功交易<span class="num">0</span>笔</span>
        </div>
        <div>
          <span>好评率<span class="num">100</span>%</span>
        </div>
      </div>

      <div class="right">
        <a href="#">&gt</a>
      </div>
      <div class="mid_1">
        <div>0</div>
        <div class="eva_1"><a href="#">差评</a></div>
      </div>
      <div class="mid_2">
        <div>0</div>
        <div class="eva_2"><a href="#">中评</a></div>
      </div>
      <div class="mid_3">
        <div>0</div>
        <div class="eva_3"><a href="#">好评</a></div>
      </div>
    </div> -->

    <div class="list">
      <ul>
        <li onclick="javascript:window.location.href='api/myself/myNews.do'">
          <a data-ajax="false" href="javascript:void(0)" data-icon="arrow-r">
            <img src="images/icon3.png" />
            <span>我的消息</span>
            <span class="redpoint" style="display:hidden">...</span>
            <span class="r-icon">&gt</span>
          </a>
        </li>
        <!-- <li>
          <a data-ajax="false" href="javascript:void(0)">
            <img src="images/icon4.png" />
            <span>我的U民</span>
            <span class="r-icon">&gt</span>
          </a>
        </li> -->
        <li onclick="javascript:window.location.href='api/myself/myPublish.do'">
          <a data-ajax="false" href="api/myself/myPublish.do">
            <img src="images/icon5.png" />
            <span>我的发布</span>
            <span class="r-icon">&gt</span>
          </a>
        </li>
        <li onclick="javascript:window.location.href='api/myself/mySell.do'">
          <a data-ajax="false" href="api/myself/mySell.do">
            <img src="images/icon6.png" />
            <span>我的卖出</span>
            <span class="r-icon">&gt</span>
          </a>
        </li>
        <li onclick="javascript:window.location.href='api/myself/myBug.do'">
          <a data-ajax="false" href="api/myself/myBug.do">
            <img src="images/icon7.png" />
            <span>我的买入</span>
            <span class="r-icon">&gt</span>
          </a>
        </li>
        <li onclick="javascript:window.location.href='api/myself/myLike.do'">
          <a data-ajax="false" href="api/myself/myLike.do">
            <img src="images/icon8.png" />
            <span>我的收藏</span>
            <span class="r-icon">&gt</span>
          </a>
        </li>
       <!--  <li>
          <a data-ajax="false" href="javascript:void(0)">
            <img src="images/icon1.png" />
            <span>设置</span>
            <span class="r-icon">&gt</span>
          </a>
        </li> -->
      </ul>
    </div>
  </div>
        
 <jsp:include page="../footer.jsp" flush="true" />
        
</div>
</body>

<script type="text/javascript">
setBase();
function setBase(){
	getMsgCount();
}

//检查消息数量
function getMsgCount(){
	$.post("api/myself/getMessageNotReadCount.do",function(date){
		if(date["STATUS"]=="OK"){
			$(".redpoint").css("display","none");
			if(date["COUNT"]>=100){
				$(".redpoint").html("...");
				$(".redpoint").css("display","");
			}else if(date["COUNT"] == 0){
				$(".redpoint").css("display","none");
			}else{
				$(".redpoint").html(date["COUNT"]);
				$(".redpoint").css("display","");
			}
		}
	},'json')
}
</script>
</html>